<template>
    <div class="main">
        <hb-title title="公告" />
        <hb-box title="列表" >
            <ul @click="e_page_">
                <li v-for="(v, i) in list" :key="i"
                    class="item cur animation"
                    :data-i="i"
                    v-text="v"
                ></li>
            </ul>
        </hb-box>
    </div>
</template>

<script>
export default {
    name: 'test',
    data() {
        return {

        }
    },
    computed: {
        list() {
            return this.$store.state.notice.tlist1
        },
    },
    created() {

    },
    methods: {
        e_page_(event) {
            let t = event.target
            let i = t.dataset.i
            if (i === undefined) {return false}
            i = Number(i)
            this.$store.commit('set_notice_which', i)
            this.$router.push('/notice/read')
        }
    }
}
</script>

<style scoped>
    .main {
        margin: 0 auto;
        width: 1200px;
    }
    .item {
        padding: 0 30px;
        line-height: 48px;
        color: var(--clr0);
    }
    .item:hover {
        color: var(--clr1);
    }
</style>